home *** CD-ROM | disk | FTP | other *** search
- /*_ msmouse.h Sat Jun 3 1989 Modified by: Walter Bright */
- /* Copyright (C) 1986-1991 by Walter Bright */
- /* All Rights Reserved */
- /* Written by Walter Bright */
- /* Interface to Microsoft mouse driver */
-
- #ifndef __MSMOUSE_H
- #define __MSMOUSE_H 1
-
- #if __cplusplus
- extern "C" {
- #endif
-
- /* signal interrupt mask constants */
- #define MSM_SIGNALMOVE 1
- #define MSM_SIGNALBUTTONDOWNL 2
- #define MSM_SIGNALBUTTONUPL 4
- #define MSM_SIGNALBUTTONDOWNR 8
- #define MSM_SIGNALBUTTONUPR 16
- #define MSM_SIGNALBUTTONDOWNM 32
- #define MSM_SIGNALBUTTONUPM 64
-
- /* preferred button masks, replacements for LEFT_,RIGHT_, and MIDDLE_ */
- #define MSM_BUTTONL 1
- #define MSM_BUTTONR 2
- #define MSM_BUTTONM 4
-
- /* old style button masks, included for compatibility only */
- #define LEFT_BUTTON 1
- #define RIGHT_BUTTON 2
- #define MIDDLE_BUTTON 0 /* so middle button is never turned on */
-
- #ifndef _WINDOWS
- /* Masks for mouse buttons */
-
- int __cdecl msm_init(void);
- void __cdecl msm_term(void);
- void __cdecl msm_showcursor(void);
- void __cdecl msm_hidecursor(void);
- int __cdecl msm_getstatus(unsigned *,unsigned *);
- void __cdecl msm_setcurpos(unsigned,unsigned);
- int __cdecl msm_getpress(unsigned *,unsigned *,unsigned *);
- int __cdecl msm_getrelease(unsigned *,unsigned *,unsigned *);
- void __cdecl msm_setareax(unsigned,unsigned);
- void __cdecl msm_setareay(unsigned,unsigned);
- void __cdecl msm_setgraphcur(int,int,int *);
- void __cdecl msm_settextcur(int,int,int);
- void __cdecl msm_readcounters(int *,int *);
- void __cdecl msm_signal(unsigned,
- void (__cdecl *)(unsigned,unsigned,unsigned,unsigned),void *);
- void __cdecl msm_lightpenon(void);
- void __cdecl msm_lightpenoff(void);
- void __cdecl msm_setratio(unsigned,unsigned);
- void __cdecl msm_condoff(unsigned,unsigned,unsigned,unsigned);
- void __cdecl msm_setthreshhold(unsigned);
- void __cdecl msm_reversebuttonon(void); /* turns reversebutton feature on, can be nested */
- void __cdecl msm_reversebuttonoff(void); /* turns reversebutton feature off, can be nested */
- int __cdecl msm_reversebuttonis(void); /* returns the status of the reversebutton feature, >0 is on, <=0 is off */
- int __cdecl msm_reversebutton(int); /* used inside mouse signal handlers to reverse buttons if required */
- #else
-
- #define MSM_SCROLLUP 120
- #define MSM_SCROLLDOWN 121
-
- #define msm_setcurpos(A,B)
- #define msm_setareax(A,B)
- #define msm_setareay(A,B)
- #define msm_setgraphcur(A,B,C)
- #define msm_settextcur(A,B,C)
- #define msm_setratio(A,B)
- #define msm_condoff(A,B,C,D)
- #define msm_setthreshhold(A)
- #define msm_lightpenon()
- #define msm_lightpenoff()
- #define msm_showcursor() ShowCursor(1)
- #define msm_hidecursor() ShowCursor(0)
- short __cdecl msm_init(void);
- void __cdecl msm_term(void);
- unsigned short __cdecl msm_hwndget(void); /* returns the window handle referenced by the last mouse event */
- /* msm_messagemonitor is placed in the window message handling procedure
- * and converts windows mouse message into the msm format
- * this is only valid in Windows, and must be installed for the other
- * functions to work.
- */
- unsigned short __cdecl msm_messagemonitor(unsigned short,unsigned short,unsigned short,unsigned long,short,short);
- unsigned short __cdecl msm_getstatus(unsigned short *,unsigned short *);
- void __cdecl msm_readcounters(short *,short *);
- short __cdecl msm_getpress(unsigned short *,unsigned short *,unsigned short *);
- short __cdecl msm_getrelease(unsigned short *,unsigned short *,unsigned short *);
- void __cdecl msm_signal(unsigned short,
- void (__cdecl *)(unsigned short,unsigned short,short,short),void *);
- void __cdecl msm_reversebuttonon(void); /* turns reversebutton feature on, can be nested */
- void __cdecl msm_reversebuttonoff(void); /* turns reversebutton feature off, can be nested */
- short __cdecl msm_reversebuttonis(void); /* returns the status of the reversebutton feature, >0 is on, <=0 is off */
- short __cdecl msm_reversebutton(short); /* used inside mouse signal handlers to reverse buttons if required */
- #endif
-
- #if __cplusplus
- }
- #endif
-
- #endif /* __MSMOUSE_H */
-
-